import com.beans.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        //1、先得到上下文
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        //2、得到bean
        UserController controller = context.getBean("userConroller",UserController.class);
        //3、使用bean
        controller.sayHi();
    }
}
